﻿using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace MyAnim.Models
{

    public class ChangePasswordModel
    {
        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Mot de passe actuel")]
        public string OldPassword
        {
            get;
            set;
        }

        [Required]
        [StringLength(100, ErrorMessage = "La chaîne {0} doit comporter au moins {2} caractères.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Nouveau mot de passe")]
        public string NewPassword
        {
            get;
            set;
        }

        [DataType(DataType.Password)]
        [Display(Name = "Confirmer le nouveau mot de passe")]
        [Compare("NewPassword", ErrorMessage = "Le nouveau mot de passe et le mot de passe de confirmation ne correspondent pas.")]
        public string ConfirmPassword
        {
            get;
            set;
        }
    }

    public class LogOnModel
    {
        [Required]
        [Display(Name = "Nom d'utilisateur")]
        public string UserName
        {
            get;
            set;
        }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Mot de passe")]
        public string Password
        {
            get;
            set;
        }

        [Display(Name = "Mémoriser le mot de passe ?")]
        public bool RememberMe
        {
            get;
            set;
        }
    }

    public class MemberRegisterModel
    {
        [Required]
        [Display(Name = "Nom d'utilisateur")]
        public string UserName
        {
            get;
            set;
        }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Adresse de messagerie")]
        public string Email
        {
            get;
            set;
        }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Team ID")]
        public string Team
        {
            get;
            set;
        }

        [Required]
        [StringLength(100, ErrorMessage = "La chaîne {0} doit comporter au moins {2} caractères.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Mot de passe")]
        public string Password
        {
            get;
            set;
        }

        [DataType(DataType.Password)]
        [Display(Name = "Confirmer le mot de passe")]
        [Compare("Password", ErrorMessage = "Le mot de passe et le mot de passe de confirmation ne correspondent pas.")]
        public string ConfirmPassword
        {
            get;
            set;
        }
    }

    public class TeamRegisterModel
    {
        [Required]
        [Display(Name = "Nom de la Team")]
        public string UserName
        {
            get;
            set;
        }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email de contact")]
        public string Email
        {
            get;
            set;
        }

        [Required]
        [DataType(DataType.Url)]
        [Display(Name = "SiteWeb")]
        public string Siteweb
        {
            get;
            set;
        }

        [DataType(DataType.Text)]
        [StringLength(3)]
        [Display(Name = "Nombre de série en cours")]
        public string NbAnime
        {
            get;
            set;
        }

        [DataType(DataType.Text)]
        [Display(Name = "Commentaire")]
        public string Comment
        {
            get;
            set;
        }
    }

    public class AnimeModel
    {
        [Required]
        [Display(Name = "Nom de la série")]
        public string Name
        {
            get;
            set;
        }
    }

    public class FileInfoModel
    {
        [Required]
        [Display(Name = "Nom du fichier")]
        public string Name
        {
            get;
            set;
        }
    }

    public class UserLogOnModel : Models.Member
    {
        [Required]
        [Display(Name = "Nom d'utilisateur")]
        public string UserName
        {
            get;
            set;
        }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Mot de passe")]
        public string Password
        {
            get;
            set;
        }

        [Display(Name = "Mémoriser le mot de passe ?")]
        public bool RememberMe
        {
            get;
            set;
        }
    }
}
